<TITLE>GtkColumnViewColumn</TITLE>
GtkColumnViewColumn
gtk_column_view_column_new
-gtk_column_view_column_new_with_factory
gtk_column_view_column_get_column_view
gtk_column_view_column_set_factory
gtk_column_view_column_get_factory
/**
* gtk_column_view_column_new:
* @title: (nullable): Title to use for this column
- *
- * Creates a new #GtkColumnViewColumn.
- *
- * You most likely want to call gtk_column_view_add_column() next.
- *
- * Returns: a new #GtkColumnViewColumn
- **/
-GtkColumnViewColumn *
-gtk_column_view_column_new (const char *title)
-{
- return g_object_new (GTK_TYPE_COLUMN_VIEW_COLUMN,
- "title", title,
- NULL);
-}
-
-/**
- * gtk_column_view_column_new_with_factory:
- * @title: (nullable): Title to use for this column
- * @factory: (transfer full): The factory to populate items with
+ * @factory: (transfer full) (nullable): The factory to populate items with
*
* Creates a new #GtkColumnViewColumn that uses the given @factory for
* mapping items to widgets.
* The function takes ownership of the
* argument, so you can write code like
* ```
- * column = gtk_column_view_column_new_with_factory (_("Name"),
+ * column = gtk_column_view_column_new (_("Name"),
* gtk_builder_list_item_factory_new_from_resource ("/name.ui"));
* ```
*
* Returns: a new #GtkColumnViewColumn using the given @factory
**/
GtkColumnViewColumn *
-gtk_column_view_column_new_with_factory (const char *title,
- GtkListItemFactory *factory)
+gtk_column_view_column_new (const char *title,
+ GtkListItemFactory *factory)
{
GtkColumnViewColumn *result;
"title", title,
NULL);
- g_object_unref (factory);
+ g_clear_object (&factory);
return result;
}
GType gtk_column_view_column_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
-GtkColumnViewColumn * gtk_column_view_column_new (const char *title);
-GDK_AVAILABLE_IN_ALL
-GtkColumnViewColumn * gtk_column_view_column_new_with_factory (const char *title,
+GtkColumnViewColumn * gtk_column_view_column_new (const char *title,
GtkListItemFactory *factory);
GDK_AVAILABLE_IN_ALL
for (i = 0; i < G_N_ELEMENTS(extra_columns); i++)
{
bytes = g_bytes_new_static (extra_columns[i].factory_xml, strlen (extra_columns[i].factory_xml));
- column = gtk_column_view_column_new_with_factory (extra_columns[i].title,
+ column = gtk_column_view_column_new (extra_columns[i].title,
gtk_builder_list_item_factory_new_from_bytes (scope, bytes));
g_bytes_unref (bytes);
sorter = GTK_SORTER (gtk_custom_sorter_new (compare_file_attribute, (gpointer) extra_columns[i].attribute, NULL));
g_signal_connect (factory, "unbind", G_CALLBACK (unbind_item), NULL);
title = g_strdup_printf ("Column %u", i);
- column = gtk_column_view_column_new_with_factory (title, factory);
+ column = gtk_column_view_column_new (title, factory);
gtk_column_view_append_column (GTK_COLUMN_VIEW (cv), column);
g_object_unref (column);
g_free (title);